xen/arm: traps: Avoid BUG_ON() in do_trap_brk()
authorJulien Grall <julien.grall@arm.com>
Wed, 15 May 2019 16:48:04 +0000 (17:48 +0100)
committerJulien Grall <julien.grall@arm.com>
Wed, 31 Jul 2019 19:19:23 +0000 (20:19 +0100)
commitf3c591f250ee8854aa33026708297d9d58986813
treedcc8c5fe369036a4ef4ee1bd8e442e46e981ee58
parente04818b46d6b08ae22d4ef05fa4dc685bba42f57
xen/arm: traps: Avoid BUG_ON() in do_trap_brk()

At the moment, do_trap_brk() is using a BUG_ON() to check the hardware
has been correctly configured during boot.

Any error when configuring the hardware could result to a guest 'brk'
trapping in the hypervisor and crash it.

This is pretty harsh to kill Xen when actually killing the guest would
be enough as misconfiguring this trap would not lead to exposing
sensitive data. Replace the BUG_ON() with crashing the guest.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/traps.c